﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Store.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<YourStore.Models.Category>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Cateogry
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Cateogry</h2>
    <table class="admin">
        <tr>
            <th></th>
           <th width="200">
                Name
            </th>
            <th width="300">
                Description
            </th>
            <th>
                Deleted
            </th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%: Html.ActionLink("Edit", "EditCateogry", new { id = item.CategoryId })%> |
                <%: Html.ActionLink("Delete", "EditCateogry", new { id = item.CategoryId })%>
            </td>
            <td>
                <%: item.Name %>
            </td>
            <td>
                <%: item.Description %>
            </td>
            <td>
                <%: item.Deleted %>
            </td>
        </tr>
    
    <% } %>

    </table>

    <p>
        <%: Html.ActionLink("Create New", "CreateCategory")%>
    </p>

</asp:Content>

